Add pharmapy-sim distribution, pixi environments, and install guide#136
Add pharmapy-sim distribution, pixi environments, and install guide#136bernalde wants to merge 6 commits into
Conversation
Introduce a `[tool.pixi]` configuration in pyproject.toml plus a committed pixi.lock so the optional Assimulo backend can be obtained reproducibly. Assimulo wraps the SUNDIALS C library via compiled Cython bindings and is conda-forge only (not pip-installable), which previously forced an ad-hoc conda environment. - Two environments mirror the pytest.ini lanes: `default` (core, Assimulo-free) and `assimulo` (full backend). Tasks: `pixi run test`, `pixi run -e assimulo test-assimulo`. - `[project]` remains the authoritative pip surface; pixi bounds mirror it. - Only linux-64 is locked (the only verified platform); other platforms can be added to `[tool.pixi.workspace].platforms`. - Ignore `.pixi/` and `.venv`/`.venv.*` so local env artifacts stay untracked. - Document the pixi path in DEPENDENCIES.md. Refs #134
bernalde
left a comment
There was a problem hiding this comment.
I found two blocking installation/documentation issues in the inline comments.
Blocking issues: 2.
Nonblocking issues: none.
Questions: none.
Validation on head 145e0f2:
- Local/GitHub changed-file sets match; the branch is based on the current
mastertip. pixi lock --checkpassed, andpixi install --all --lockedinstalled both locked environments.pixi run test: 56 passed, 4 skipped for missing Assimulo as intended, 6 deselected.pixi run -e assimulo test-assimulo: 14 passed, 56 deselected.python -m build --sdist --wheel --no-isolationbuilt both artifacts; a fresh Python 3.13 venv installed the wheel with pip and importedPharmaPyfrom site-packages successfully.- Current GitHub checks for this head are successful: Core tests and Assimulo integration tests. Local pytest runs emitted existing deprecation/runtime warnings.
The build evidence shows that the [tool.pixi] configuration itself does not obstruct setuptools or pip. The blockers are the occupied PyPI distribution namespace and the absence of a safe, authoritative installation guide. This account authored the PR, so GitHub does not allow it to submit a formal REQUEST_CHANGES verdict; this COMMENT carries the blocking findings.
Merge readiness: not ready. I would not merge this until the blocking issues above are addressed.
|
Addressed both blocking review findings in
Verification:
No requested finding was declined. The full Sphinx build still depends on the |
bernalde
left a comment
There was a problem hiding this comment.
Maintainer review at the current head cc50392. Since my pixi commit (145e0f2), this branch advanced with two more commits — 232cbb9 (pip distribution + install guide) and cc50392 (clarify install paths) — so the PR now covers three things: the pixi environments, a PyPI distribution rename PharmaPy → pharmapy-sim, and an installation-guide overhaul. I authored this PR, so this is a COMMENT (GitHub rejects author APPROVE/REQUEST_CHANGES). No blocking findings at this head.
Prior blocking issues are resolved (verified independently)
The earlier review at 145e0f2 raised two Blocking issues; both are genuinely fixed here, and I re-verified rather than trusting the reply:
pip install PharmaPygrabbed an unrelated project. Confirmedhttps://pypi.org/pypi/pharmapy/json→ HTTP 200 (taken, unrelated NER package). The fix renames[project].nameand the pixi editable key topharmapy-sim, preservingimport PharmaPy. Confirmedpharmapy-simandpharmapy_sim→ HTTP 404 (both free, so PyPI-normalized name is genuinely available).INSTALLATION.mdandinstallation.rstexplicitly warn againstpip install pharmapy.- No runnable install guide.
INSTALLATION.mdis now authoritative (install matrix, venv/pip source install, pixi prerequisite +--lockedcommands, Assimulo,linux-64limitation, verification), linked from README, DEPENDENCIES.md, andinstallation.rst; the legacyinstall_instructions.txt,InstallOnMac.sh,InstallOnWindows.batare removed with no dangling references (grep-confirmed), andMANIFEST.inupdated.
Verified this pass (linux-64)
pixi install --all --lockedatcc50392succeeds — the committedpixi.lockmatches the manifest after the rename (lock editable entry ispharmapy-sim), so the advertised command works.pixi run -e assimulo python -c "import PharmaPy, assimulo"→ import OK, Assimulo 3.4.3.- Core lane
pixi run test→ 56 passed, 4 skipped, 6 deselected. - RST link target
.. _PharmaPy installation guide:is defined (no undefined-reference error for a-Wdocs build); README link uses the correctPharmaPy-org/.../blob/masterURL. - PR-head CI: Core tests SUCCESS, Assimulo integration tests SUCCESS.
Nonblocking
- PR title/body are stale. They describe only the pixi environments, but the PR now also renames the PyPI distribution to
pharmapy-simand overhauls installation docs. Update the title/body before merge so the scope — especially the public-identity rename — is visible to reviewers and in the merge commit. - pixi is not exercised by CI. Nothing runs
pixi install --locked, so the committed lock can silently drift from the manifest (a future manifest edit without a re-lock would break the advertised--lockedcommand).INSTALLATION.mdis honest about this. Recommend a follow-up CI lane (apixi install --all --lockedsmoke job) and a tracking issue, while keeping a pip-only core job. - Consider reserving
pharmapy-simon PyPI. It is free today, but nothing prevents a third party from registering it before the first release, which would reproduce exactly the collision this PR fixes. A placeholder release (or an explicit accepted-risk note) would close that gap.
Scope note
The PR bundles pixi + the distribution rename + the install-guide overhaul. These are causally linked (advertising pip install via pixi surfaced the namespace collision), so bundling is defensible, but if smaller PRs are preferred the rename+guide could be split from the pixi mechanism. Given they are intertwined and green, I did not treat this as blocking.
Merge-readiness
No blocking findings. Live state: state=OPEN, mergeStateStatus=CLEAN, reviewDecision empty; both PR-head CI checks SUCCESS. This is a body-only review (no inline threads), so it does not change mergeStateStatus. This author account cannot supply a formal APPROVE — GitHub currently reports no approval gate; if branch protection requires one, another eligible maintainer must approve. Recommend refreshing the PR title/body (scope) before merge.
Note: a prior review on this PR (145e0f2) is also under this account, from concurrent work on the same branch; GitHub takes the most recent review per reviewer, so this supersedes it for reviewDecision purposes.
|
Addressed the current-head review follow-ups in
Verification:
No Blocking finding was declined. I intentionally did not publish a placeholder PyPI release: reserving or publishing The two earlier blocking threads remain unresolved for reviewer verification. GitHub reports an empty |
bernalde
left a comment
There was a problem hiding this comment.
Close-out review at head a37e50e, focused on the new CI commit a37e50e ("ci: verify locked pixi environments") that landed after my previous review at cc50392. Earlier commits (145e0f2, 232cbb9, cc50392) were reviewed already; all prior findings are resolved (see below). I authored this PR, so this is a COMMENT — GitHub rejects author APPROVE/REQUEST_CHANGES. No blocking findings.
The new CI commit (a37e50e) — verified
a37e50e replaces the ad-hoc conda setup of the integration-assimulo job with a pixi-based lane:
prefix-dev/setup-pixi@v0.10.0— tag exists (confirmed via the GitHub API),pixi-version: v0.67.1,locked: true,manifest-path: pyproject.toml, both environments.- Steps:
pixi install --all --locked(re-runs the documented command),import PharmaPy, assimulo, thenpixi run -e assimulo test-assimulo. - The
core-testsjob stays pip-based and gating, preserving the pip-installability guarantee. - Workflow
permissions: contents: read(least privilege);cache-writeis correctly gated topushonmaster(no PR-branch cache poisoning). - Actual run
30050280722at this head: every step of both jobs concludedsuccess— including "Verify documented locked installation", "Verify solver imports", and "Run Assimulo-marked tests" — so the green result is real, not a swallowed failure.
Prior findings — all addressed
- Prior
Blocking(pyproject.toml):pip install PharmaPygrabbed an unrelated package → renamed topharmapy-sim, re-confirmed at this head. - Prior
Blocking(DEPENDENCIES.md): no runnable install guide →INSTALLATION.mdauthoritative and linked. - My
stale-pr-metadata→ title/body now describe the rename, pixi, and install guide. - My
pixi-not-in-ci→ this commit adds exactly that lane. - My
reserve-pypi-name→ documented guard added (recheck before release; do not advertise the index install until upload).
I am resolving the two prior Blocking inline threads for hygiene, since both are addressed at this head.
Nonblocking
- Assimulo CI lane is non-gating vs the "verifies" claim. See inline.
Merge-readiness
No blocking findings; the current head genuinely passes both CI jobs (verified at the step level). Live state before this review: state=OPEN, mergeStateStatus=CLEAN, reviewDecision empty — no approval gate is enforced. This author account cannot supply a formal APPROVE; if branch protection later requires one, another eligible maintainer must approve. This review adds one Nonblocking inline thread; since conversation resolution is not enforced (CLEAN), it does not gate merge. Remaining non-code follow-ups are already tracked in the PR body (linux-64-only lock, PyPI name reservation at release, #131 docs overlap).
|
|
||
| - The core job installs PharmaPy editably with pip and runs the solver-free | ||
| tests. | ||
| - The Assimulo job installs both pixi environments from the committed lockfile, |
There was a problem hiding this comment.
Nonblocking: this presents the Assimulo job as a verification guarantee ("installs both pixi environments ... reruns the documented pixi install --all --locked command, verifies ..."), but that job carries continue-on-error: true (ci.yml, job declaration ~line 49), so any failure is non-gating — a broken lockfile or failed solver import would still report the check green. The non-blocking Assimulo lane is a reasonable, pre-existing strategy (assimulo/SUNDIALS is flaky), and it is not introduced by this PR, but a37e50e now leans on it as the lock-verification mechanism. Consider either (a) splitting the deterministic pixi install --all --locked lock-consistency check into a gating step/job (it is not flaky the way solver runs are), or (b) softening this paragraph to say the Assimulo lane is advisory/non-blocking. Not a merge blocker.
There was a problem hiding this comment.
Addressed in a8517cc using option (a). Locked pixi install is now a separate gating job with no continue-on-error; it installs both locked environments, reruns the documented command, and verifies core and solver imports. The Assimulo solver-test job remains explicitly advisory and depends on that gating job. The guide and PR body now state this boundary, and all three current-head jobs passed.
|
Addressed the remaining nonblocking CI-semantics finding in
Verification:
No finding was declined. The two prior blocking threads are now resolved by the reviewer; the new CI-semantics thread remains unresolved for reviewer verification. GitHub reports an empty |
Summary
Establish a safe
pharmapy-simdistribution identity, add reproducible pixienvironments for development and Assimulo, and provide an authoritative
installation guide.
pharmapynamespace topharmapy-simwhile preservingimport PharmaPy.[project]authoritative for pip builds and install the local projecteditably in pixi.
default— core, Assimulo-free (matches-m "not assimulo")assimulo— full solver backend (matches-m assimulo)pixi run testandpixi run -e assimulo test-assimulo.retain the potentially flaky Assimulo solver-test job as advisory.
INSTALLATION.mdcovering pip, pixi, Assimulo, platformsupport, verification, and the manual conda fallback.
remove the obsolete
setup.py developinstaller scripts.Installation model
pixi configuration stays under
[tool.pixi]; it is a development and solverenvironment manager, not a runtime dependency of the wheel. Core users install
from a checkout with:
python -m pip install .After the first release, the distribution command will be:
Do not run
pip install pharmapy: that name belongs to an unrelated package.The
pharmapy-simname was available when checked, but this PR does not reserveit. Maintainers must recheck it immediately before the first release and must
not advertise the index-install command until publication succeeds.
Assimulo 3.4.3 is not available from PyPI. The supported solver path therefore
uses its conda-forge build through the locked pixi environment.
Verification (linux-64)
actionlint .github/workflows/ci.yml— passed.pixi lock --check— lockfile is current.pixi install --all --locked— both environments installed.pixi run test— 56 passed, 4 skipped, 6 deselected.pixi run -e assimulo test-assimulo— 14 passed, 56 deselected.pharmapy-sim==0.0.1from the working tree;the Assimulo environment imports Assimulo 3.4.3.
python -m build --sdist --wheel --no-isolation— builtpharmapy_sim-0.0.1sdist and wheel, withINSTALLATION.mdin the sdist.python -m pip install .,python -m pip check, andimport PharmaPyall passed; the distribution metadata reportspharmapy-sim==0.0.1.python -m docutils --strict doc/online_docs/installation.rst ...passed.The full Sphinx build cannot start on this branch because the existing docs
environment does not install
nbsphinx; PR Publish reproducible PharmaPy documentation #131 owns that reproducible docsenvironment and build.
integration tests all passed. The locked-install job is gating; it installed
both environments from
pixi.lock, reran the documented install command,and verified core and solver imports. The solver-test job remains advisory.
Scope / follow-ups
linux-64is locked and verified. Extending supportrequires adding a platform under
[tool.pixi.workspace].platforms,regenerating the lockfile, and running both lanes there.
Assimulo solver-test job retains
continue-on-error: trueto preserve theexisting tolerance for compiled solver instability.
environment.ymlremains as an unlocked manual fallback.pharmapy-simrequires releaseauthority and credentials and is intentionally not performed by this PR.
pyproject.toml, and theinstallation page. Whichever PR lands second must preserve this installation
guide and the
pharmapy-simdistribution name while retaining Publish reproducible PharmaPy documentation #131's docsdependency and metadata updates.
changed here.
Refs #134.